package com.ly.heart.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ly.common.core.domain.AjaxResult;
import com.ly.heart.domain.KingInvoiceReceivableEntity;
import com.ly.heart.domain.dto.KingInvoiceReceivableDto;
import com.ly.heart.domain.vo.KingInvoiceReceivableVo;

/**
 * 金蝶-发票-应收单/销售开票Service接口
 * @author wutao
 * @date 2024-06-26
 */
public interface IKingInvoiceReceivableService extends IService<KingInvoiceReceivableEntity> {
    /**
     * 查询金蝶-发票-应收单/销售开票
     * @param id 金蝶-发票-应收单/销售开票ID
     * @return 金蝶-发票-应收单/销售开票
     */
    KingInvoiceReceivableVo selectKingInvoiceReceivableEntityById (String id);

    /**
     * 查询金蝶-发票-应收单/销售开票列表
     * @param kingInvoiceReceivableEntity 金蝶-发票-应收单/销售开票
     * @return 金蝶-发票-应收单/销售开票集合
     */
    List<KingInvoiceReceivableEntity> selectKingInvoiceReceivableEntityList (KingInvoiceReceivableEntity kingInvoiceReceivableEntity);

    Integer selectKingInvoiceReceivableCount (KingInvoiceReceivableEntity kingInvoiceReceivableEntity);

    /**
     * 通过id查询应收单关联对象
     * @param id
     * @return
     */
    KingInvoiceReceivableEntity querySingleById (String id);

    /**
     * 新增金蝶-发票-应收单/销售开票
     * @param kingInvoiceReceivableDto 金蝶-发票-应收单/销售开票
     * @return 结果
     */
    AjaxResult draft (KingInvoiceReceivableDto kingInvoiceReceivableDto);

    /**
     * 新增金蝶-发票-应收单/销售开票
     * @param receivableEntity 金蝶-发票-应收单/销售开票
     * @return 结果
     */
    AjaxResult submit (KingInvoiceReceivableEntity receivableEntity);

    /**
     * 修改金蝶-发票-应收单/销售开票
     * @param kingInvoiceReceivableDto 金蝶-发票-应收单/销售开票
     * @return 结果
     */
    AjaxResult updateKingInvoiceReceivableEntity (KingInvoiceReceivableDto kingInvoiceReceivableDto);

    /**
     * 批量删除金蝶-发票-应收单/销售开票
     * @param ids 需要删除的金蝶-发票-应收单/销售开票ID
     * @return 结果
     */
    AjaxResult deleteKingInvoiceReceivableEntityByIds (String[] ids);

    AjaxResult queryList (KingInvoiceReceivableEntity kingInvoiceReceivableEntity);

    /**
     * 应收单冲红，选择应收单
     * @param kingInvoiceReceivableEntity
     * @return
     */
    AjaxResult queryListByReceivable (KingInvoiceReceivableEntity kingInvoiceReceivableEntity);

    /**
     * 应收单审核业务处理
     * @param id
     * @return
     */
    AjaxResult approve (String id);

    /**
     * 销售出库单审批后调用该方法，用于生成一正一负应收单
     * @param inventoryId
     * @param orderId
     * @return
     */
    AjaxResult inventoryApprove (String inventoryId, String orderId);

}
